package com.snailhd.common.db.resultparsehander;

import com.snailhd.common.db.AbstractDBResultParseHandler;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author hd
 * @description
 * @date 2019-08-17 17:14
 */
public class StringForDBResultParseHandler extends AbstractDBResultParseHandler {

    @Override
    public boolean supportsResult(Class clazz) {
        return String.class == clazz;
    }

    @Override
    public String handle(ResultSet rs,Class clazz,String field) throws SQLException {
        return rs.getString(field);
    }
}
